package com.android.lotto;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.android.lotto.activity.BaseActivity;
import com.android.lotto.activity.MainActivity;

public class SplashActivity extends BaseActivity {
    private final int SPLASH_DISPLAY_LENGHT = 1000; //Splash display time

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_lotto_splash);

        new Handler().postDelayed(new Runnable() {
            public void run() {
                Intent intent= new Intent(SplashActivity.this,
                        MainActivity.class);

                startActivity(intent);
                finish();
            }
        }, SPLASH_DISPLAY_LENGHT);
    }
}
